package com.smbms.dao.user.impl;

import java.util.List;

import org.mybatis.spring.SqlSessionTemplate;

import com.smbms.dao.user.mapper.UserMapper;
import com.smbms.pojo.User;

public class UserMapperImpl implements com.smbms.dao.user.mapper.UserMapper {

	private SqlSessionTemplate sqlSessionTemplate;

	public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) {
		this.sqlSessionTemplate = sqlSessionTemplate;
	}
	
	public SqlSessionTemplate getSqlSessionTemplate() {
		return sqlSessionTemplate;
	}
	
	public List<User> searchByNameAndRole(String name, Integer userRole) {
		List<User> users = sqlSessionTemplate.getMapper(UserMapper.class).searchByNameAndRole(name, userRole);
		return users;
		
	}

	@Override
	public Integer add(User user) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int getUserList(User user) {
		// TODO Auto-generated method stub
		return 0;
	}
}
